#!/bin/bash
# Automate an end-to-end run of coreos-installer with the metal image, which then
# boots and writes a success message to a virtio-serial port, which we read on the host.
set -euo pipefail

set -x

dn=$(dirname "$0")
# shellcheck source=src/cmdlib.sh
. "${dn}"/cmdlib.sh

build=${1:-latest}
arch=$(arch)
builddir=builds/${build}/${arch}
buildmeta=${builddir}/meta.json

exec kola testiso --cosa-build "${buildmeta}" "$@"
